import { useDollarGet, useDollarPost } from "~/composables/useDollarFetchRequest";
import { objectToQueryString } from "~/utils/func";

// 买家更新订单联系方式
export const updateOrderContact = async (data) => useDollarPost('/api/system/order/updateOrderContact', data)
// 提交订单 - 获取订单ID
export const commitOrder = async (data) => useDollarPost('/api/skill/buyerOrder/commit', data)
// 创建订单 - 新支付接口
export const createOrder = async (data) => useDollarPost('/api/payment/create', data)
// 买家购买服务-微信二维码
export const getWechatPayCode = async (data) => useDollarPost('/api/system/order/createQrCodeWx', data)
// 买家购买服务-支付宝二维码
export const getAlipayPayCode = async (data) => useDollarPost('/api/system/order/createQrCodeAlipay', data)
// 支付查询订单
export const queryOrderPayStatus = async (data) => useDollarPost('/api/skill/buyerOrder/queryOrderPayStatus', data)
// 订单详情-买家
export const buyerOrderDetail = async (data) => useDollarGet('/api/skill/buyerOrder/detail?' + objectToQueryString(data))
// 确认收货
export const confirmReceipt = async (data) => useDollarPost('/api/skill/buyerOrder/confirmReceipt', data)
// 发布评价
export const buyerComment = async (data) => useDollarPost('/api/comment/comment/buyerComment', data)
// 取消订单
export const cancelOrder = async (data) => useDollarPost('/api/skill/buyerOrder/cancel', data)
// 订单加价支付-支付宝二维码
export const getRiseOrderAlipayCode = async (data) => useDollarPost('/api/system/order/riseQrCodeAlipay', data)
// 订单加价支付-微信二维码
export const getRiseOrderWechatCode = async (data) => useDollarPost('/api/system/order/riseQrCodeWx', data)
// 企业支付-平台账号信息
export const getCompanyPayInfo = async (data) => useDollarPost('/api/system/order/getPlatformAccount', data)
// 买家购买服务-企业支付
export const createOrderBank = async (data)=>useDollarPost('/api/system/order/createOrderBank', data)



